#ifndef SDK_OHOS_API_OHOS_MEDIA_STEAM_INTERFACE_H_
#define SDK_OHOS_API_OHOS_MEDIA_STEAM_INTERFACE_H_

#include "api/ref_count.h"
#include "ohos_audio_track_interface.h"
#include "ohos_media_track_interface.h"
#include "ohos_video_track_interface.h"

namespace ohoswebrtc {

typedef std::vector<rtc::scoped_refptr<OHOSAudioTrackInterface> > OHOSAudioTrackVector;
typedef std::vector<rtc::scoped_refptr<OHOSVideoTrackInterface> > OHOSVideoTrackVector;

class OHOSMediaStreamInterface : public webrtc::RefCountInterface {
  public:
    /** Adds the given audio track to this media stream. */
    virtual void AddAudioTrack(rtc::scoped_refptr<OHOSAudioTrackInterface> track) = 0;
    /** Adds the given video track to this media stream. */
    virtual void AddVideoTrack(rtc::scoped_refptr<OHOSVideoTrackInterface> track) = 0;
    /** Removes the given audio track to this media stream. */
    virtual void RemoveAudioTrack(rtc::scoped_refptr<OHOSAudioTrackInterface> track) = 0;
    /** Removes the given video track to this media stream. */
    virtual void RemoveVideoTrack(rtc::scoped_refptr<OHOSVideoTrackInterface> track) = 0;
    /** The audio tracks in this stream. */
    virtual OHOSAudioTrackVector GetAudioTracks() = 0;
    /** The video tracks in this stream. */
    virtual OHOSVideoTrackVector GetVideoTracks() = 0;

    /** find The audio tracks by track id. */
    virtual rtc::scoped_refptr<OHOSAudioTrackInterface> FindAudioTrack(
        const std::string track_id) = 0;
    /** find The video tracks by track id. */
    virtual rtc::scoped_refptr<OHOSVideoTrackInterface> FindVideoTrack(
        const std::string track_id) = 0;
    /** An identifier for this media stream. */
    virtual const std::string stream_id() = 0;
    /**
     * MediaStreamInterface representation of this OHOSMediaStream object. This is
     * needed to pass to the underlying C++ APIs.
     */
    virtual const rtc::scoped_refptr<webrtc::MediaStreamInterface> media_stream() = 0;

 protected:
    ~OHOSMediaStreamInterface() {}
};
}

#endif